//
//  ToolsClass.h
//  YouChangCall
//
//  Created by app on 2016/11/29.
//  Copyright © 2016年 HZJiTeng. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ToolsClass : NSObject
#pragma mark -- 提示框
+ (void)showTipsWithInfo:(NSString*)infoStr;
#pragma mark -- 提示框 提示信息较长的
+(void)showLongTipsWithInfo:(NSString*)infoStr;
#pragma mark -- 活动弹窗
+(void)showTipsWithActivityAlertInfo:(NSString*)infoStr;
#pragma mark -- 生成随机字符串
+ (NSString *)getRandomStringWithLength:(NSInteger)length;
#pragma mark -- 获取当前日期
+ (NSString *)getNowDate;
#pragma mark -- 获取当前时间戳（毫秒）
+ (NSString *)currentTimeStr;
#pragma mark -- 获取当前日期(毫秒)
+ (NSString *)getNowTimeTimestamp3;
#pragma mark -- MD5加密(32位小写)
+ (NSString *)stringToMD5:(NSString *)str;
#pragma mark --颜色转图片
+ (UIImage*)createImageWithColor:(UIColor*)color;
#pragma mark -- 高度适配
+ (CGFloat)heightContains:(CGFloat)height;
#pragma mark --字典转json
+ (NSString *)convertToJsonData:(NSDictionary *)dict;
#pragma mark --字典转json（不去掉参数里的空格）
+ (NSString *)newConvertToJsonData:(NSDictionary *)dict;
#pragma mark --json转字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
#pragma mark --同盾参数
+ (NSDictionary *)getOptionWithType;
#pragma mark --webview授权链接
+ (NSString *)middleUrlWithPath:(NSString *)pathStr;
#pragma mark ----- 获取系统默认字符串高度获取如下:-https://www.jianshu.com/p/198ba2d155ab
+ (CGFloat)getStringHeightWithText:(NSString *)text font:(UIFont *)font viewWidth:(CGFloat)width;

#pragma mark -- 创建带请求头的请求
/**
 urlStr:链接
 headDic:存放请求头的字典
 bodyDic:存放请求体的字典
 */
+ (void)createPostHeaderRequestWithURL:(NSString *)urlStr withHeadDictionary:(NSDictionary *)headDic withBodyDictionary:(NSDictionary *)bodyDic withBlock:(void(^)(id obj,BOOL success))block;
#pragma mark -- 创建带有请求头的get请求
+ (void)createGetHeaderRequestWithURL:(NSString *)urlStr withHeadDictionary:(NSDictionary *)headDic withBlock:(void(^)(id obj,BOOL))block;
#pragma mark -- 判断某一个时间是今天，昨天或其他
+ (NSString *)getDateStr:(NSString *)str;
#pragma mark -- 判断手机号是否合法
+ (BOOL)valiMobile:(NSString *)mobile;
#pragma mark -- 获取当前视图所在的控制器
+ (UIViewController *)viewControllerWithView:(UIView *)view;
#pragma mark -- 跳转相应页面
+ (void)pushVCWithVCName:(GWBaseViewController *)vcName withParameters:(NSString *)urlStr;


#pragma mark -- 获取缓存文件路径
+ (NSString *)getCachesPath;
#pragma mark -- 计算缓存
+ (float)getCacheSizeAtPath:(NSString*)folderPath;
#pragma mark -- 获取index天后的日期
+(NSDate *)getDateWithIndex:(NSInteger )index;
#pragma mark -- 计算两个日期之间的天数
+ (NSInteger)calcDaysFromBegin:(NSDate *)beginDate end:(NSDate *)endDate;
#pragma mark -- 获取日期是周几
+ (NSString *)calculateWeek:(NSDate *)date;
#pragma mark-日期比较
+ (NSInteger )compareDate:(NSDate *)date01 withDate:(NSDate *)date02;
#pragma mark-date转字符串
+ (NSString *)getDate:(NSDate *)date;
#pragma mark-date转字符串 月-日
+ (NSString *)getDateMonthWithDay:(NSDate *)date;
#pragma mark-将字符串转成NSDate类型
+ (NSDate *)dateFromString:(NSString *)dateString;
#pragma mark -- 获取一个日期几天前的日期
+ (NSString *)getDateWithDate:(NSString *)date withIndex:(NSInteger)index;

+ (AFHTTPSessionManager *)sharedHTTPSession;
#pragma mark -- 清除缓存
+ (void)clearCacheAtPath:(NSString *)path withBlock:(void(^)(BOOL))block;

#pragma mark -- webView的request添加header
+ (NSURLRequest *)addHeaderForRequest:(NSURLRequest *)request;
#pragma marh --身份证正则
+ (BOOL)isIdentityCard:(NSString *)IDCardNumber;
#pragma mark -- 创建显示错误信息的视图
+ (void)createWrongViewWithImage:(NSString *)imageName withTipsString:(NSString *)tips withView:(UIView *)view;
#pragma mark -- 专门为流水页面创建一个错误视图
+ (void)createWrongViewForFlowWaterWithView:(UIView *)view;
#pragma mark -- 将错误视图移除
+ (void)clearWrongViewWith:(UIView *)view;
#pragma mark -- 顶部提示框
+ (void)showTopTopsView:(NSString *)tips withBOOL:(BOOL)index;
#pragma mark -- 设置字体
+ (CGFloat)getFont:(CGFloat)font;
#pragma mark -- 将银行卡卡号前边的变成*，并且每四位添加空格，
+ (NSString *)getNewBankNumWitOldBankNum:(NSString *)bankNum;
+ (void)cellCornerRadius:(CGFloat)cornerRadius withView:(UIView *)view withByRoundingCorners:(NSInteger)byRoundingCorners;
#pragma mark -- 退出登录，清除用户信息
+ (void)clearUserData;

#pragma mark -- 测试
+ (void)textBlobk:(void (^)(NSString *str,id obj))block;

/**
 *  二维码生成(Erica Sadun 原生代码生成)
 *
 *  @param string   内容字符串
 *  @param size 二维码大小
 *  @param color 二维码颜色
 *  @param backGroundColor 背景颜色
 *
 *  @return 返回一张图片
 */
+ (UIImage *)qrImageWithString:(NSString *)string size:(CGSize)size color:(UIColor *)color backGroundColor:(UIColor *)backGroundColor;



@end
